package guava.service;

import com.google.common.util.concurrent.AbstractExecutionThreadService;

/**
 * Created by lxue on 16/5/7.
 */
public class SingleThreadService extends AbstractExecutionThreadService {
    protected void startUp() {
//        dispatcher.listenForConnections(port, queue);
    }

    /**
     * 单线程跑
     */
    protected void run() {
//        Connection connection;
//        while ((connection = queue.take() != POISON)) {
//            process(connection);
//        }
    }
    protected void triggerShutdown() {
//        dispatcher.stopListeningForConnections(queue);
//        queue.put(POISON);
    }

}
